<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../Another/Style/jquery-ui.css"/>
<script type="text/javascript" src="../Another/JQuery/jquery1.9.2.min.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery_ui.js"></script>
<link rel="stylesheet" type="text/css" href="../Another/Style/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="../Another/Style/bootstrap-responsive.css"/>
<script type="text/javascript" src="../Another/JQuery/bootstrap-transition.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-alert.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-modal.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tab.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-popover.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery.validate.js"></script>
<style>
.control-label{
	margin-left: 100px;
	margin-right: 10px;
}
</style>
<script type="text/javascript">
	  $(document).ready(function(){
			$('input').hover(function()
			{
			$(this).popover('show')
		});
			$("#registerHere").validate({
				rules:{
					MaNhom: "required",
					TenLoai:"required",
					TenChiTietLoai: "required",
					
				},
				messages:{
					MaNhom: "Nhập vào nhóm sản phẩm",
					TenLoai:"Nhập vào tên loại sản phẩm",
					TenChiTietLoai: "Nhập vào tên chi tiết loại sản phẩm",
					
				},
				errorClass: "help-inline",
				errorElement: "span",
				highlight:function(element, errorClass, validClass) {
					$(element).parents('.control-group').addClass('error');
				},
				unhighlight: function(element, errorClass, validClass) {
					$(element).parents('.control-group').removeClass('error');
					$(element).parents('.control-group').addClass('success');
				}
			});
		});
</script>

  <div class="container">
	  <div class="row">
	  		<div class="span8">
		<form class="form-horizontal" id="registerHere" method='post' action="../MyControl/themloai.php">
	  <fieldset>
	    <legend>Thêm Loại Sản Phẩm</legend>
        <div class="control-group">
              <label class="control-label" for="input01">Nhóm Sản Phẩm</label>
              <div class="controls">
                <select name="MaNhom" id="MaNhom">
                    <option value=”0″>–Chọn Nhóm Sản Phẩm–</option>
                    <?php
						include "../MyControl/connection.php";
                        $sql="select * from nhomsanpham";
                        $result=mysql_query($sql);
                        while($row=mysql_fetch_array($result)){
                            echo '<option value="'.$row["MaNhom"].'">'.$row["TenNhom"].'</option>';
                        }
						mysql_close($con);
                    ?>          
                </select>   
                 <td align='center'><a id='h1' href='../MyModel/TrangAdmin_con.php?themnhom'>
			<img src='../Another/Images/add1.png' alt='them' style='borderwidth:
			0px;'/></a></td>       
              </div>
        </div>
        
	 <div class="control-group">
		<label class="control-label" for="input01">Tên Loại</label>
	      <div class="controls">
	        <input type="text" class="input-xlarge" id="TenLoai" name="TenLoai" rel="popover" />
	       
	      </div>
	</div>
	
	
	<div class="control-group">
		<label class="control-label" for="input01">Tên Chi Tiết Loại</label>
	      <div class="controls">
	        <input type="text" class="input-xlarge" id="TenChiTietLoai" name="TenChiTietLoai" rel="popover"/>
	       
	      </div>
	</div>   
	<div class="control-group">
		<label class="control-label" for="input01"></label>
	      <div class="controls">
	       <button type="submit" class="btn btn-success" rel="tooltip" title="first tooltip" name="loai">Thêm</button>
           &nbsp;
            &nbsp;
             &nbsp;
              &nbsp;
	        <button type="reset" class="btn btn-success" rel="tooltip" title="first tooltip">Nhập Lại</button>
	      </div>
			
	</div>
	</fieldset>
	</form>
   </div>
	
		</div>
        
        
          </div><!--/row-->
        </div><!--/span-->
      </div><!--/row-->
